/*
 * 作者:熊猫
 * 日期:2017 - 3 - 19 11 - 29 - 1
 *
 */

package net.lainiao.morethread.Chapter7.demo9;

/**
 * Created by Administrator on 2017/3/19.
 */
public class Product implements Runnable {
    MyPriorityTransferQueue<Event> buffer;

    public Product(MyPriorityTransferQueue<Event> buffer) {
        this.buffer = buffer;
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            Event event=new Event(Thread.currentThread().getName(),i);
            buffer.put(event);
        }
    }
}
